Integrand size = 30, antiderivative size = 121 \[ \int (e \sec (c+d x))^{3-n} (a+i a \tan (c+d x))^n \, dx=\frac {i 2^{\frac {3+n}{2}} a \operatorname {Hypergeometric2F1}\left (\frac {1}{2} (-1-n),\frac {3-n}{2},\frac {5-n}{2},\frac {1}{2} (1-i \tan (c+d x))\right ) (e \sec (c+d x))^{3-n} (1+i \tan (c+d x))^{\frac {1}{2} (-1-n)} (a+i a \tan (c+d x))^{-1+n}}{d (3-n)} \]
I*2^(3/2+1/2*n)*a*hypergeom([3/2-1/2*n, -1/2-1/2*n],[5/2-1/2*n],1/2-1/2*I* tan(d*x+c))*(e*sec(d*x+c))^(3-n)*(1+I*tan(d*x+c))^(-1/2-1/2*n)*(a+I*a*tan( d*x+c))^(-1+n)/d/(3-n)
Time = 17.56 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.96 \[ \int (e \sec (c+d x))^{3-n} (a+i a \tan (c+d x))^n \, dx=\frac {8 e^3 \operatorname {Hypergeometric2F1}\left (3,\frac {3-n}{2},\frac {5-n}{2},-\cos (2 (c+d x))+i \sin (2 (c+d x))\right ) \sec (d x) (e \sec (c+d x))^{-n} (i+\tan (d x)) (a+i a \tan (c+d x))^n}{d (-3+n) (\cos (c)+i \sin (c))^3 (-i+\tan (d x))^2} \]
(8*e^3*Hypergeometric2F1[3, (3 - n)/2, (5 - n)/2, -Cos[2*(c + d*x)] + I*Si n[2*(c + d*x)]]*Sec[d*x]*(I + Tan[d*x])*(a + I*a*Tan[c + d*x])^n)/(d*(-3 + n)*(e*Sec[c + d*x])^n*(Cos[c] + I*Sin[c])^3*(-I + Tan[d*x])^2)
Time = 0.57 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.29, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3042, 3986, 3042, 4006, 80, 79}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+i a \tan (c+d x))^n (e \sec (c+d x))^{3-n} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+i a \tan (c+d x))^n (e \sec (c+d x))^{3-n}dx\) |
\(\Big \downarrow \) 3986 |
\(\displaystyle (a-i a \tan (c+d x))^{\frac {n-3}{2}} (a+i a \tan (c+d x))^{\frac {n-3}{2}} (e \sec (c+d x))^{3-n} \int (a-i a \tan (c+d x))^{\frac {3-n}{2}} (i \tan (c+d x) a+a)^{\frac {n+3}{2}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (a-i a \tan (c+d x))^{\frac {n-3}{2}} (a+i a \tan (c+d x))^{\frac {n-3}{2}} (e \sec (c+d x))^{3-n} \int (a-i a \tan (c+d x))^{\frac {3-n}{2}} (i \tan (c+d x) a+a)^{\frac {n+3}{2}}dx\) |
\(\Big \downarrow \) 4006 |
\(\displaystyle \frac {a^2 (a-i a \tan (c+d x))^{\frac {n-3}{2}} (a+i a \tan (c+d x))^{\frac {n-3}{2}} (e \sec (c+d x))^{3-n} \int (a-i a \tan (c+d x))^{\frac {1-n}{2}} (i \tan (c+d x) a+a)^{\frac {n+1}{2}}d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 80 |
\(\displaystyle \frac {a^2 2^{\frac {1}{2}-\frac {n}{2}} (1-i \tan (c+d x))^{\frac {n-1}{2}} (a-i a \tan (c+d x))^{\frac {1-n}{2}+\frac {n-3}{2}} (a+i a \tan (c+d x))^{\frac {n-3}{2}} (e \sec (c+d x))^{3-n} \int \left (\frac {1}{2}-\frac {1}{2} i \tan (c+d x)\right )^{\frac {1-n}{2}} (i \tan (c+d x) a+a)^{\frac {n+1}{2}}d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 79 |
\(\displaystyle -\frac {i a 2^{\frac {3}{2}-\frac {n}{2}} (1-i \tan (c+d x))^{\frac {n-1}{2}} (a-i a \tan (c+d x))^{\frac {1-n}{2}+\frac {n-3}{2}} (a+i a \tan (c+d x))^{\frac {n-3}{2}+\frac {n+3}{2}} (e \sec (c+d x))^{3-n} \operatorname {Hypergeometric2F1}\left (\frac {n-1}{2},\frac {n+3}{2},\frac {n+5}{2},\frac {1}{2} (i \tan (c+d x)+1)\right )}{d (n+3)}\) |
((-I)*2^(3/2 - n/2)*a*Hypergeometric2F1[(-1 + n)/2, (3 + n)/2, (5 + n)/2, (1 + I*Tan[c + d*x])/2]*(e*Sec[c + d*x])^(3 - n)*(1 - I*Tan[c + d*x])^((-1 + n)/2)*(a - I*a*Tan[c + d*x])^((1 - n)/2 + (-3 + n)/2)*(a + I*a*Tan[c + d*x])^((-3 + n)/2 + (3 + n)/2))/(d*(3 + n))
3.5.90.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(( a + b*x)^(m + 1)/(b*(m + 1)*(b/(b*c - a*d))^n))*Hypergeometric2F1[-n, m + 1 , m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m, n}, x] && !IntegerQ[m] && !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] || !(RationalQ[n] && GtQ[-d/(b*c - a*d), 0]))
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(c + d*x)^FracPart[n]/((b/(b*c - a*d))^IntPart[n]*(b*((c + d*x)/(b*c - a*d))) ^FracPart[n]) Int[(a + b*x)^m*Simp[b*(c/(b*c - a*d)) + b*d*(x/(b*c - a*d) ), x]^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && !IntegerQ[m] && !Integ erQ[n] && (RationalQ[m] || !SimplerQ[n + 1, m + 1])
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)])^(n_.), x_Symbol] :> Simp[(d*Sec[e + f*x])^m/((a + b*Tan[e + f*x])^(m/ 2)*(a - b*Tan[e + f*x])^(m/2)) Int[(a + b*Tan[e + f*x])^(m/2 + n)*(a - b* Tan[e + f*x])^(m/2), x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 + b^2, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + ( f_.)*(x_)])^(n_), x_Symbol] :> Simp[a*(c/f) Subst[Int[(a + b*x)^(m - 1)*( c + d*x)^(n - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n }, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]
\[\int \left (e \sec \left (d x +c \right )\right )^{3-n} \left (a +i a \tan \left (d x +c \right )\right )^{n}d x\]
\[ \int (e \sec (c+d x))^{3-n} (a+i a \tan (c+d x))^n \, dx=\int { \left (e \sec \left (d x + c\right )\right )^{-n + 3} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n} \,d x } \]
1/8*(((-I*n - I)*e^(4*I*d*x + 4*I*c) - 2*I*n*e^(2*I*d*x + 2*I*c) - I*n + I )*(2*e*e^(I*d*x + I*c)/(e^(2*I*d*x + 2*I*c) + 1))^(-n + 3)*e^(I*d*n*x + I* c*n + n*log(2*e*e^(I*d*x + I*c)/(e^(2*I*d*x + 2*I*c) + 1)) + n*log(a/e)) + 8*d*e^(2*I*d*x + 2*I*c)*integral(-1/8*(n^2 + (n^2 - 1)*e^(4*I*d*x + 4*I*c ) + 2*(n^2 - 1)*e^(2*I*d*x + 2*I*c) - 1)*(2*e*e^(I*d*x + I*c)/(e^(2*I*d*x + 2*I*c) + 1))^(-n + 3)*e^(I*d*n*x + I*c*n - 2*I*d*x + n*log(2*e*e^(I*d*x + I*c)/(e^(2*I*d*x + 2*I*c) + 1)) + n*log(a/e) - 2*I*c), x))*e^(-2*I*d*x - 2*I*c)/d
\[ \int (e \sec (c+d x))^{3-n} (a+i a \tan (c+d x))^n \, dx=\int \left (e \sec {\left (c + d x \right )}\right )^{3 - n} \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{n}\, dx \]
\[ \int (e \sec (c+d x))^{3-n} (a+i a \tan (c+d x))^n \, dx=\int { \left (e \sec \left (d x + c\right )\right )^{-n + 3} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n} \,d x } \]
8*(6*a^n*e^3*cos(c*n + (d*n + d)*x + c) + 6*I*a^n*e^3*sin(c*n + (d*n + d)* x + c) - (a^n*e^3*n - 5*a^n*e^3)*cos(c*n + (d*n + 3*d)*x + 3*c) - 6*((I*a^ n*d*e^(n + 3)*n^3 - 7*I*a^n*d*e^(n + 3)*n^2 + 7*I*a^n*d*e^(n + 3)*n + 15*I *a^n*d*e^(n + 3))*cos(c*n) + ((I*a^n*d*e^(n + 3)*n^3 - 7*I*a^n*d*e^(n + 3) *n^2 + 7*I*a^n*d*e^(n + 3)*n + 15*I*a^n*d*e^(n + 3))*cos(c*n) - (a^n*d*e^( n + 3)*n^3 - 7*a^n*d*e^(n + 3)*n^2 + 7*a^n*d*e^(n + 3)*n + 15*a^n*d*e^(n + 3))*sin(c*n))*cos(6*d*x + 6*c) + 3*((I*a^n*d*e^(n + 3)*n^3 - 7*I*a^n*d*e^ (n + 3)*n^2 + 7*I*a^n*d*e^(n + 3)*n + 15*I*a^n*d*e^(n + 3))*cos(c*n) - (a^ n*d*e^(n + 3)*n^3 - 7*a^n*d*e^(n + 3)*n^2 + 7*a^n*d*e^(n + 3)*n + 15*a^n*d *e^(n + 3))*sin(c*n))*cos(4*d*x + 4*c) + 3*((I*a^n*d*e^(n + 3)*n^3 - 7*I*a ^n*d*e^(n + 3)*n^2 + 7*I*a^n*d*e^(n + 3)*n + 15*I*a^n*d*e^(n + 3))*cos(c*n ) - (a^n*d*e^(n + 3)*n^3 - 7*a^n*d*e^(n + 3)*n^2 + 7*a^n*d*e^(n + 3)*n + 1 5*a^n*d*e^(n + 3))*sin(c*n))*cos(2*d*x + 2*c) - (a^n*d*e^(n + 3)*n^3 - 7*a ^n*d*e^(n + 3)*n^2 + 7*a^n*d*e^(n + 3)*n + 15*a^n*d*e^(n + 3))*sin(c*n) - ((a^n*d*e^(n + 3)*n^3 - 7*a^n*d*e^(n + 3)*n^2 + 7*a^n*d*e^(n + 3)*n + 15*a ^n*d*e^(n + 3))*cos(c*n) - (-I*a^n*d*e^(n + 3)*n^3 + 7*I*a^n*d*e^(n + 3)*n ^2 - 7*I*a^n*d*e^(n + 3)*n - 15*I*a^n*d*e^(n + 3))*sin(c*n))*sin(6*d*x + 6 *c) - 3*((a^n*d*e^(n + 3)*n^3 - 7*a^n*d*e^(n + 3)*n^2 + 7*a^n*d*e^(n + 3)* n + 15*a^n*d*e^(n + 3))*cos(c*n) - (-I*a^n*d*e^(n + 3)*n^3 + 7*I*a^n*d*e^( n + 3)*n^2 - 7*I*a^n*d*e^(n + 3)*n - 15*I*a^n*d*e^(n + 3))*sin(c*n))*si...
\[ \int (e \sec (c+d x))^{3-n} (a+i a \tan (c+d x))^n \, dx=\int { \left (e \sec \left (d x + c\right )\right )^{-n + 3} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n} \,d x } \]
Timed out. \[ \int (e \sec (c+d x))^{3-n} (a+i a \tan (c+d x))^n \, dx=\int {\left (\frac {e}{\cos \left (c+d\,x\right )}\right )}^{3-n}\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^n \,d x \]